<?php

class Core_Helper_Global_Sef {

    public function addSefUrl($type, $sourceId, $sourceUrl, $rewriteUrl, $transaction = NULL) {
        App::getModel('website/sef')
        		->setSourceId($sourceId)
                ->setSourceType($type)
                ->setSourceUrl($sourceUrl)
                ->setRewriteUrl($rewriteUrl)
                ->save($transaction);
    }

    public function modifySef($type, $sourceId, $sourceUrl, $rewriteUrl, $transaction = NULL) {
        App::getModel('website/sef')
                ->loadBySourceId($type, $sourceId)
                ->setSourceUrl($sourceUrl)
                ->setRewriteUrl($rewriteUrl)
                ->save($transaction);
    }

    
}